﻿using GraduationProject.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace GraduationProject.Webs.Controllers
{
    public class BaseController : Controller
    {
        /// <summary>
        /// 获取当前用户对象
        /// </summary>
        protected User CurrentUser
        {
            get
            {
                //从Session中获取用户对象
                if (SessionHelper.GetSession("loginUser") != null)
                {
                    return SessionHelper.GetSession("loginUser") as User;
                }
              
                return null;
            }
        }
    }
}